package simulatorUS;

import java.awt.EventQueue;

class USRunner {
	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					USParam.init();
					MainFrame mainFrame = new MainFrame();
					mainFrame.frmUltrasonicDoubleBill.setVisible(true);
					UART_Manager usartManager = new UART_Manager();
					US_EventHandler handler = new US_EventHandler();
					handler.addCommandExecutor("usartManager", usartManager);
					handler.addCommandExecutor("mainFrame", mainFrame);
					mainFrame.SetSystemEventHandler(handler);
					usartManager.SetSystemEventHandler(handler);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}
}
